FlattenMovieData
TheFlattenMovieData
function creates a new movie file and creates a new movie that contains all of its movie data. However, unlike theFlattenMovie
function described in the previous section, this function does not add the new movie resource to the new movie file. Instead, theFlattenMovieData
function returns the new movie to your application. Your application must dispose of the returned movie.
pascal Movie FlattenMovieData (Movie theMovie, long movieFlattenFlags, const FSSpec *theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags);
theMovie
- Specifies the movie for this operation. Your application obtains this movie identifier from such functions as
NewMovie
,NewMovieFromFile
, andNewMovieFromHandle
(described on page 2-80, page 2-76, and page 2-78, respectively).movieFlattenFlags
- Controls the process of adding movie data to the new movie file. These flags affect how the toolbox adds movies to the new movie file later. The following flags are available (be sure to set unused flags to 0):
flattenAddMovieToDataFork
- Causes the movie to be placed in the data fork of the new movie file. You may use this flag to create single-fork movie files, which can be more easily moved to other computer systems from your Macintosh.
flattenDontInterleaveFlatten
- Allows you to disable the Movie Toolbox's data storage optimizations. By default, the Movie Toolbox stores movie data in a format that is optimized for the storage device. Set this flag to 1 to disable these optimizations.
flattenActiveTracksOnly
- Causes the Movie Toolbox to add only enabled movie tracks to the new movie file. You can use the
SetTrackEnabled
function, which is described on page 2-132, to enable and disable movie tracks.theFile
- Contains a pointer to the file system specification for the movie file to be created.
creator
- Specifies the creator value for the new file.
scriptTag
- Specifies the script in which the movie file should be created. Set this parameter to
smSystemScript
to use the system script; set it tosmCurrentScript
to use the current script. See Inside Macintosh: Text for more information about scripts and script tags.creationFlags
- Controls file creation options. The following flag is available:
createMovieFileDeleteCurFile
- Indicates whether to delete an existing file. If you set this flag to 1, the Movie Toolbox deletes the file (if it exists) before creating the new movie file. If this flag is set to 0 and the file specified by the
fileSpec
parameter already exists, the Movie Toolbox uses the existing file. In this case, the toolbox ensures that the file has both a data and a resource fork. If this flag isn't set, the data is appended to the file.DESCRIPTION
TheFlattenMovieData
function returns the movie identifier of the new movie. If the function could not create the movie, it sets this returned identifier tonil
.You can also use this function to create a single-fork movie file. Set the
flattenAddMovieToDataFork
flag in themovieFlattenFlags
parameter to 1. The Movie Toolbox then places the movie into the data fork of the movie file.The Movie Toolbox calls your progress function during long operations.
The Movie Toolbox does not alter the source movie.
ERROR CODES
File Manager errors
invalidMovie -2010 This movie is corrupted or invalid progressProcAborted -2019 Your progress function returned an error cantCreateSingleForkFile -2022 Error trying to create a single-fork file
Memory Manager errors